How to return an array with the step of the sum of the previous value

join shbcf.ru